import axios from '@/libs/api.request'
import { getToken } from '@/libs/util'

/*
认证码接口
 */
export const apiAuthKey = (param) => {
  return axios.request({
    url: '/api/site/api/test/auth-key',
    method: 'post',
    dataType: 'json',
    headers: {
      'token': getToken()
    },
    data: 'param=' + param
  })
}

/*
心跳接口
 */
export const apiHeartbeat = (param) => {
  return axios.request({
    url: '/api/site/api/test/heartbeat',
    method: 'post',
    dataType: 'json',
    headers: {
      'token': getToken()
    },
    data: 'param=' + param
  })
}

/*
数据接口
 */
export const apiData = (param) => {
  return axios.request({
    url: '/api/site/api/test/data',
    method: 'post',
    dataType: 'json',
    headers: {
      'token': getToken()
    },
    data: 'param=' + param
  })
}

/*
日志接口
 */
export const apiLog = (param) => {
  return axios.request({
    url: '/api/site/api/test/log',
    method: 'post',
    dataType: 'json',
    headers: {
      'token': getToken()
    },
    data: 'param=' + param
  })
}

/*
统计接口
 */
export const apiCount = (param) => {
  return axios.request({
    url: '/api/site/api/test/count',
    method: 'post',
    dataType: 'json',
    headers: {
      'token': getToken()
    },
    data: 'param=' + param
  })
}

/*
反馈接口
 */
export const apiFeedback = (param) => {
  return axios.request({
    url: '/api/site/api/test/feedback',
    method: 'post',
    dataType: 'json',
    headers: {
      'token': getToken()
    },
    data: 'param=' + param
  })
}
